clear
capture log close
set more off


*set paths*
gl script   = "[User path]\Countervailing power\Data\Scripts"
gl main     = subinstr("$script", "\Scripts", "", .)
gl root     = subinstr("$data", "\Data", "", .)

gl input   "$main\Input"
gl output  "$main\Output"
gl log     "$main\Logs"
gl temp    "$main\Temp"

********************************

*November 25, 2020 
***NOTE: Pull claims files from HCCI SQL database prior to running Stata scripts***
do "$script/01 Load claims.do" //Loads claims files pulled from SQL server to Stata
do "$script/02 Clean claims.do" //Cleans and processes claims files for use in analysis
do "$script/03 Clean hospital IDs.do" //Assigns unique hospital IDs to claims so they can be combined by hospital and matched to hospital characteristics
do "$script/04 Load hospital characteristics.do" //Merges in AHA hospital characteristic data
do "$script/05 Combine ancillary data files.do" //Load ancilary data files and merges them to the analytic file
do "$script/06 Distance calculations.do" //Calculates straight line distances between patient ZIPs and hospitals
do "$script/07 Create master analysis file.do" //Retains observations and variables for analysis
do "$script/08 Price calculations.do" //Calculates hospital-level severity adjusted prices by year

exit
